<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.6.4/jquery.js"></script>
    <script>
        $(function(){
            let divHtml = $("div").html()
            // 标签中的内容
            console.log("jQuery的html()",divHtml)

            let inVal = $(":input").val()
            console.log("jQuery的 val()", inVal)
            let inHtml = $(":input").html()
            console.log("jQuery的 html()", inHtml)
            
            console.log("attr()返回对应属性的值:", $(":input").attr("value"))

            $(":input").attr("value", "改变value的值")
            console.log("attr()改变后属性的值:", $(":input").val())
        })
    </script>
</head>

    <div>这是一个div</div>

    <input type="text" value="我是value"/>


</body>
</html>